{% extends "base_amp.html" %}
{% load  mezzanine_tags comment_tags keyword_tags rating_tags i18n future disqus_tags staticfiles event_tags amp_tags%}

{% block meta_title %}{{ blog_post.meta_title }}{% endblock %}

{% block meta_keywords %}{% metablock %}
{% keywords_for blog_post as tags %}
{% for tag in tags %}{% if not forloop.first %}, {% endif %}{{ tag }}{% endfor %}
{% endmetablock %}{% endblock %}

{% block meta_description %}{% metablock %}
{{ blog_post.description }}
{% endmetablock %}{% endblock %}

{% block breadcrumb_menu %}
{{ block.super }}
<span class="active">{{ blog_post.title }}</span>
{% endblock %}

{% block title %}
<h2>Blog</h2>
{% endblock %}

{% block main %}
<h2>{{ blog_post.title }}</h2>
<article>
<div>
{% block blog_post_detail_postedby %}
<span class="post-meta">
    {% trans "Posted by" %}:
    {% with blog_post.user as author %}
    <a href="{% url "blog_post_list_author" author %}">{{ author.get_full_name|default:author.username }}</a>
    {% endwith %}
    <span>{{ blog_post.publish_date }}</span>
</span>
{% endblock %}
{% block blog_post_detail_commentlink %}
<p>
    {% if blog_post.allow_comments %}
        {% if settings.COMMENTS_DISQUS_SHORTNAME %}
        {% else %}(<a href="#comments">{% spaceless %}
            {% blocktrans count comments_count=blog_post.comments_count %}{{ comments_count }} comment{% plural %}{{ comments_count }} comments{% endblocktrans %}
            {% endspaceless %}</a>)
        {% endif %}
    {% endif %}
</p>
{% endblock %}

{% block blog_post_detail_content %}
<div>
{{ blog_post.content|richtext_filters|replace:"/<img/<amp-img height=400 layout='fixed-height'" | replace:"/img>/amp-img>"  |safe }}
</div>
{% endblock %}
</div>

<div>
    <br />或许您还需要下面的文章:
    {% block blog_post_detail_related_posts %}
    {% if blog_post.related_posts.all %}
    <div id="related-posts">
    <ul>
    {% for post in blog_post.related_posts.all %}
     <li><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></li>
    {% endfor %}
    </ul>
    </div>
    {% endif %}

    {% endblock %}
</div>
</article>

<section class="aboutme">
    <div>
        <h3>关于我</h3>
    </div>
    <div>
        <p>
        Github: <a rel="nofollow" href="https://github.com/phodal" target="_blank">@phodal</a> &nbsp;&nbsp;&nbsp;
        微博:<a rel="nofollow" href="http://weibo.com/phodal" target="_blank">@phodal</a> &nbsp;&nbsp;&nbsp;
        知乎:<a rel="nofollow" href="http://www.zhihu.com/people/phodal" target="_blank">@phodal</a> &nbsp;&nbsp;&nbsp;
        </p>

        <strong>微信公众号(Phodal)</strong>
        <br>
    </div>
    <div>
        <p>围观我的<a href="https://github.com/phodal/ideas">Github Idea</a>墙, 也许，你会遇到心仪的项目<br /></p>
        QQ技术交流群: 321689806
    </div>
</section>

{% endblock %}

{% block right_panel %}
{% include "blog/includes/filter_panel_without_month.html" %}
{% endblock %}
